import { nanoid } from 'nanoid'

export const userTempId = () => {
  let uid = localStorage.getItem('userTempId')
  if (!uid) {
    uid = nanoid()
    localStorage.setItem('userTempId', uid)
  }
  return uid
}